home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
logixp1a
/
dsping.frm
(
.txt
)
next >
Wrap
Visual Basic Form
|
1999-09-03
|
16KB
|
412 lines
VERSION 5.00
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "LOGIX PINGER"
ClientHeight = 4245
ClientLeft = 1740
ClientTop = 2025
ClientWidth = 5670
Icon = "dsPing.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
Picture = "dsPing.frx":0442
ScaleHeight = 4245
ScaleWidth = 5670
StartUpPosition = 2 'CenterScreen
Begin VB.HScrollBar amount
Height = 255
LargeChange = 10
Left = 1440
Max = 1000
Min = 1
TabIndex = 14
Top = 2880
Value = 1
Width = 1215
End
Begin VB.TextBox Text5
Height = 315
Left = 2880
TabIndex = 13
Text = "1"
Top = 360
Width = 495
End
Begin VB.TextBox Text4
Height = 315
Left = 2280
TabIndex = 11
Text = "0"
Top = 360
Width = 495
End
Begin VB.TextBox Text3
Height = 315
Left = 1800
TabIndex = 10
Text = "0"
Top = 360
Width = 495
End
Begin VB.TextBox Text2
Height = 315
Left = 1320
TabIndex = 9
Text = "0"
Top = 360
Width = 495
End
Begin VB.TextBox Text1
Height = 315
Left = 840
TabIndex = 8
Text = "0"
Top = 360
Width = 495
End
Begin VB.CommandButton Command1
Caption = "Ping Series"
Height = 255
Left = 120
TabIndex = 7
Top = 3360
Width = 1215
End
Begin VB.TextBox txTTL
Height = 285
Left = 5160
TabIndex = 5
Text = "5"
Top = 2880
Width = 375
End
Begin VB.CommandButton btnPing
Caption = "Ping Single"
Default = -1 'True
Height = 255
Left = 120
TabIndex = 3
Top = 2880
Width = 1215
End
Begin VB.ListBox lbReturn
Height = 1500
Left = 120
TabIndex = 2
Top = 1320
Width = 5295
End
Begin VB.TextBox txIPAddress
Height = 285
Left = 840
TabIndex = 1
Text = "0.0.0.0"
Top = 960
Width = 4575
End
Begin VB.Line Line2
X1 = 120
X2 = 5400
Y1 = 840
Y2 = 840
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "Ping series pings the set you have next to the series label. It does not do anything with the single box."
ForeColor = &H000040C0&
Height = 855
Left = 1440
TabIndex = 16
Top = 3360
Width = 4215
End
Begin VB.Line Line1
X1 = 0
X2 = 5520
Y1 = 3240
Y2 = 3240
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "1"
ForeColor = &H000040C0&
Height = 255
Left = 2760
TabIndex = 15
Top = 2880
Width = 615
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "-"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 255
Left = 2760
TabIndex = 12
Top = 360
Width = 135
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Series"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 255
Left = 120
TabIndex = 6
Top = 360
Width = 735
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Time To Live (TTL) :"
ForeColor = &H000040C0&
Height = 255
Left = 3240
TabIndex = 4
Top = 2880
Width = 1935
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Single:"
ForeColor = &H000040C0&
Height = 255
Left = 120
TabIndex = 0
Top = 960
Width = 615
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************************
' PingVB
' This application implements a TCP/IP network ping
' using the ICMP.DLL provided as part of Windows 95 and
' Windows NT.
' IP_STATUS codes returned from IP APIs
'*******************************************************************
Private Const IP_STATUS_BASE = 11000
Private Const IP_SUCCESS = 0
Private Const IP_BUF_TOO_SMALL = (11000 + 1)
Private Const IP_DEST_NET_UNREACHABLE = (11000 + 2)
Private Const IP_DEST_HOST_UNREACHABLE = (11000 + 3)
Private Const IP_DEST_PROT_UNREACHABLE = (11000 + 4)
Private Const IP_DEST_PORT_UNREACHABLE = (11000 + 5)
Private Const IP_NO_RESOURCES = (11000 + 6)
Private Const IP_BAD_OPTION = (11000 + 7)
Private Const IP_HW_ERROR = (11000 + 8)
Private Const IP_PACKET_TOO_BIG = (11000 + 9)
Private Const IP_REQ_TIMED_OUT = (11000 + 10)
Private Const IP_BAD_REQ = (11000 + 11)
Private Const IP_BAD_ROUTE = (11000 + 12)
Private Const IP_TTL_EXPIRED_TRANSIT = (11000 + 13)
Private Const IP_TTL_EXPIRED_REASSEM = (11000 + 14)
Private Const IP_PARAM_PROBLEM = (11000 + 15)
Private Const IP_SOURCE_QUENCH = (11000 + 16)
Private Const IP_OPTION_TOO_BIG = (11000 + 17)
Private Const IP_BAD_DESTINATION = (11000 + 18)
' The next group are status codes passed up on status indications to
' transport layer protocols.
Private Const IP_ADDR_DELETED = (11000 + 19)
Private Const IP_SPEC_MTU_CHANGE = (11000 + 20)
Private Const IP_MTU_CHANGE = (11000 + 21)
Private Const IP_UNLOAD = (11000 + 22)
Private Const IP_ADDR_ADDED = (11000 + 23)
Private Const IP_GENERAL_FAILURE = (11000 + 50)
Private Const MAX_IP_STATUS = 11000 + 50
Private Const IP_PENDING = (11000 + 255)
' option information for network ping, we don't implement these here as this is
' a simple sample (simon says).
Private Type ip_option_information
Ttl As Byte 'Time To Live
Tos As Byte 'Type Of Service
Flags As Byte 'IP header flags
OptionsSize As Byte 'Size in bytes of options data
OptionsData As Long 'Pointer to options data
End